package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-07-05
 * Time: 9:09
 */
public class Test {


    public static void main(String[] args) {

    }
    public static void main2(String[] args) {
        Integer a = 127;
        Integer b = 127;
        Integer c = 128;
        Integer d = 128;
        System.out.println(a == b);
        System.out.println(c == d);
    }
    public static void main1(String[] args) {
        //包箱
        int a = 10;
        Integer b = Integer.valueOf(a);//显示包箱

        Integer c = 30;//自动包箱

        //拆箱
        Double d = 19.0;//自动装箱
        double d1 = d;//自动拆箱

        double d2 = d.doubleValue();//显示拆箱

        System.out.println(b);
        System.out.println(c);
        System.out.println(d1);
        System.out.println(d2);

        double d3 = b.doubleValue();
//        Double d4 = Integer.valueOf(a);
    }
}
